package com.j180.web_two.job;

import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
@EnableScheduling  //打开定时任务
public class PrintJob {

    //Scheduled 调度
    //cron 设置调度的时间 多次用,隔开，  几次用 /
    //@Scheduled(cron = "10 19,21 17 * * ?" )
    @Scheduled(cron = "0 36 17 * * ?" )
    public void doJob(){
        //System.out.println("hello quartz===>>>");
        System.out.println("做数据库备份");
    }

    @Scheduled(cron = "0 37 17 * * ?" )
    public void doJob2(){
        System.out.println("统计任务完成度=====>>>");
    }
}
